<?php
/**
 * Created by PhpStorm.
 * User: 戎大富
 * Date: 2019/6/12
 * Time: 14:31
 */
namespace app\admin\controller;
use think\db;
class Today extends Base {
    public function index(){
        $time = date('Y-m-d');
        $where['revenue_time'] = array('like',"%$time%");
        $where['revenue_status'] = 1;
        $res1 = Db::table('up_revenue')->where($where)->sum('revenue_glod');
        $res2 = Db::table('up_revenue')->where($where)->sum('revenue_price');
        $this->assign('res1',$res1);
        $this->assign('res2',$res2);
        return $this->fetch();
    }
}